package com.colin.app.app;

import android.os.Bundle;

import com.colin.app.activity.view.webview.WebViewActivity;
import com.colin.library.base.BasePresenter;
import com.colin.library.base.BaseView;
import com.colin.library.other.AppException;

/**
 * Created by Colin on 2017/1/15.
 */

public class BasePresenterImpl implements BasePresenter {
    protected AppActivity mAppActivity = null;
    protected BaseView mBaseView;

    public BasePresenterImpl(AppActivity mAppActivity, BaseView mBaseView) {
        if (null == mBaseView) {
            throw new AppException("初始化界面时，请先实现View接口");
        }
        this.mAppActivity = mAppActivity;
        this.mBaseView = mBaseView;
    }

    @Override
    public void setData() {

    }

    @Override
    public void httpLoadData(boolean isRefresh) {

    }

    @Override
    public void toWebViewActivity(String url) {
        Bundle bundle = new Bundle();
        bundle.putString("url", url);
        mBaseView.startActivity(WebViewActivity.class, bundle, false);
    }


    @Override
    public void destroy() {

    }
}
